import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.test.sdk.pay.util.ConnectionUtil;

/**
 * @author 徒有琴
 */
public class WorkSender {
    public static void main(String[] args) throws Exception {
        Connection connection = ConnectionUtil.getConnection();
        Channel channel = connection.createChannel();
        channel.queueDeclare("test_queue_work", false, false, false, null);
        for (int i = 0; i < 100; i++) {
            String message = "work " + i;
            channel.basicPublish("", "test_queue_work", null, message.getBytes());
        }
        channel.close();
        connection.close();
    }
}
